ExamPlay Light Logo
로그인

Computer Science for IGCSE & O level - Programming (Section 16 - No. 13)

What would be the outcome if the `answer` variable is given the value "*" in a case statement where cases are defined for '+', '-', '*' and '/', but no default case is available?
The code block corresponding to the '*' case would be executed.
The code block for the '+' case would be executed.
No code block would be executed.
The program would exit with an error.

설명

The program will search for a match. Because the '*' is a value in the cases, the code block will execute.

댓글 (0)

댓글을 달려면 로그인하세요
광고
BrainBehindX Inc Logo
©2026; 에 의해 구동 BrainBehindX Inc